package com.pdd.beans;

import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * 评论实体类
 */
@Getter
@Setter
@ToString
public class Comment {

        private int     c_id;       //评论编号
        private int     u_id;       //评论人编号，外键user表
        private int     p_id;       //商品编号，外键product表
        private String  content;  //评论内容
        private Date    time;     //评论时间
        private String times;

        public String getTimes() {
                return new SimpleDateFormat("yyyy-MM-dd  HH:mm:ss").format(time);
        }

}
